package top.huhuiyu.springboot3.p2301.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serial;
import java.io.Serializable;

@Component
@Data
@ConfigurationProperties(prefix = "api-info")
public class ApiConfigInfo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    private String app_id;
    private String app_secret;
    private NewsUrl news_url;
    private String amap_weather_key;
    private AMapUrl amapUrl;

    @Data
    public static class NewsUrl implements Serializable {
        @Serial
        private static final long serialVersionUID = 1L;
        private String type;
        private String list;
        private String detail;
    }

    @Data
    public static class AMapUrl implements Serializable {
        @Serial
        private static final long serialVersionUID = 1L;
        private String weather;
        private String ip;
        private String geo;

    }


}
